<template>
	<view>
		<!-- 班长确认 -->
		<!-- <view v-if="node == 1">
			<StepShiftsMonitorConfirm />
		</view> -->

		<!-- 交班 -->
		<!-- <view v-if="[2, 3, 4, 5, 6].indexOf(Number(node)) > -1">
			<StepShiftsHandover />
		</view> -->

		<!-- 确认 -->
		<!-- <view v-if="[7, 8, 9, 10, 11, 12, 13].indexOf(Number(node)) > -1">
			<StepShiftsConfirm />
		</view> -->

		<!-- 发起人节点 -->
		<!-- <view v-if="node == 0">
			<StepShiftsRestart />
		</view> -->
		
		<!-- 当班主操 -->
		<view v-if="node == 14">
			<StepShiftsMainOperator editable />
		</view>
		
		<!-- 接班确认，当班巡检确认 -->
		<view v-if="node == 1 || node == 15">
			<StepShiftsMainOperator />
		</view>
	</view>
</template>

<script>
	// import StepShiftsMonitorConfirm from './components/StepShiftsMonitorConfirm.vue'
	// import StepShiftsHandover from './components/StepShiftsHandover.vue'
	// import StepShiftsConfirm from './components/StepShiftsConfirm.vue'
	// import StepShiftsRestart from './components/StepShiftsRestart.vue'
	// import StepShiftsRestart from './components/StepShiftsRestart.vue'
	
	
	import StepShiftsMainOperator from './components/StepShiftsMainOperator.vue'
	
	export default {
		components: {
			// StepShiftsMonitorConfirm,
			// StepShiftsConfirm,
			// StepShiftsHandover,
			// StepShiftsRestart
			StepShiftsMainOperator
		},
		data() {
			return {
				changeShiftInfoId: '',
				node: '',
				processTaskId: '',
				options: '',
				nodeType: {
					1: '接班确认',
					2: '生产交班',
					3: '设备交班',
					4: '安全交班',
					5: '综合交班',
					6: '其他交班',
					7: '生产确认',
					8: '设备确认',
					9: '安全确认',
					10: '综合确认',
					11: '其他确认',
					12: '交班班长确认',
					13: '接班班长确认',
					0: '重新申请交接班',
				}
			}
		},
		onLoad(options) {
			this.changeShiftInfoId = options.id
			this.node = options.node
			this.processTaskId = options.taskId
			this.options = options
			this.setTitle()

		},
		methods: {
			setTitle() {
				uni.setNavigationBarTitle({
					title: this.nodeType[this.node]
				})
			}
		}
	}
</script>

<style>

</style>
